package cn.qhfn.service.impl;

import cn.qhfn.dao.PetDao;
import cn.qhfn.dao.impl.PetDaoImpl;
import cn.qhfn.entity.Pet;
import cn.qhfn.service.PetService;

import java.util.List;

public class PetServiceImpl implements PetService {
    PetDao dao = new PetDaoImpl();

    @Override
    public boolean addPet(Pet pet) {
        return dao.addPet(pet)>0;
    }

    @Override
    public boolean deletePet(int id) {
        return dao.deletePet(id)>0;
    }

    @Override
    public boolean updatePet(Pet pet) {
        return dao.updatePet(pet)>0;
    }

    @Override
    public Pet getPet(int id) {
        return dao.getPet(id);
    }

    @Override
    public List<Pet> getPets() {
        return dao.getPets();
    }
}
